<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="referrer" content="no-referrer">
    <title>图片轮播</title>
    <style>
        body{
            text-align: center;
        }
        img {
            width: 500;
            height: 500px;
        }
    </style>
</head>
<body>
    <img src="https://gitee.com/Agares1024/img/raw/master/img/11-2022-11-1809:01:25.jpg">

    <script>
        const arr = ["https://gitee.com/Agares1024/img/raw/master/img/11-2022-11-1809:01:25.jpg",
                    "https://gitee.com/Agares1024/img/raw/master/img/22-2022-11-1809:01:30.jpg",
                    "https://gitee.com/Agares1024/img/raw/master/img/33-2022-11-1809:01:33.jpg"];

        var img = document.getElementsByTagName("img")[0];
        var i = 0;
        function fn(){
            i < 2 ? i++ : i = 0;
            img.src = arr[i];
        }
        setInterval(fn,1500);
    </script>

</body>
</html>